#include <bits/stdc++.h>
using namespace std;
const int MAX = (int)1e5 + 5;

int a[MAX];
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);

    int n,ans;
    cin>>n;
    int caneat = 0,allexistd = 1;
    ans = n;
    for(int i = 1;i <= n;i++)
    {
        cin>>a[i];
    }
    sort(a+1,a+n+1);
    for(int i = 2;i <= n;i++)
    {
       if(a[i]>a[i-1])
       {
           //must can kill
           caneat=allexistd-1;
           ans--;
       }
       else
        {
            allexistd++;
            if(caneat!=0)
            {
                allexistd--;caneat--;ans--;
            }
       }
    }
    cout<<ans<<endl;
    return 0;
}
